package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.pojo.EquityPic;
import com.srzk.youthleagueback.pojo.InnovationPic;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface EquityPicMapper {
    @Insert("insert into equity_pic (id,picture)" +
            "values (#{equity_pic.id}, #{equity_pic.picture})")
    int insert(@Param("equity_pic") EquityPic record);

    @Select("SELECT * FROM equity_pic WHERE id = #{id}")
    List<EquityPic> selectByPrimaryKeyList(Long id);

    List<EquityPic> selectAll();

    @Delete("DELETE FROM equity_pic WHERE id = #{id}")
    int deleteByUserAndYearAndTypeAndId(@Param("id")Long id);
}